#include <stdio.h>
int main()
{
    int m, b, s, g;
    scanf("%d", &m);
    b = m / 100;
    s = (m % 100) / 10;
    g = m % 10;
    if (g == 0 && s == 0)
        printf("%d", b);
    if (g == 0 && s != 0)
        printf("%d%d", s, b);
    if (g != 0)
        printf("%d%d%d", g, s, b);
    return 0;
}
//血与泪的教训
//请换变量名
//不要使用gsb做变量名
//尝试使用驼峰命名法
//Plz change your variable values' name
//DO NOT USE g,s,b as your variable values' name
//Try camel case!!!!!!